//
//  TopicHeadView.m
//  lisure0.1
//
//  Created by xalo on 16/4/22.
//  Copyright © 2016年 Mr.wangYongxu. All rights reserved.
//

#import "TopicHeadView.h"
#import "TopicModel.h"
#import "authOrUsrModel.h"


@implementation TopicHeadView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

-(void)awakeFromNib{
    [self layoutIfNeeded];
    

}


-(void)setViews:(TopicModel*)model{
    self.titleLable.text = model.title;
    self.unameLable.text = model.userinfoModel.uname;
    [[self.iconImage layer] setMasksToBounds:YES];
    [[self.iconImage layer] setCornerRadius:self.iconImage.frame.size.width/2];
    [self.iconImage sd_setImageWithURL:[NSURL URLWithString:model.userinfoModel.icon] placeholderImage:nil];
    self.addtimeLable.text = model.addtime_f;
    self.contentLable.text = model.content;
}



@end
